<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2007-9-10
  Time: 21:51:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/common/taglib.jsp" %>
<table class=tableCommonStyle cellpadding=3 cellspacing=1 border=0 align=center>
    <tr>
        <td class=catStyle valign=middle align=center><b>栏目管理</b></td>
    </tr>
</table>

<table width="578" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
    <s:form method="post" action="/admin/catalogManage.do">
        <tr>
            <td height="33" colspan="4" align="center" valign="middle">
                &nbsp;&nbsp;栏目名称:
                <s:text size="20" name="catalog.name"/>&nbsp;
                <s:submit name="addCatalog" value="添加"/>
            </td>
        </tr>
    </s:form>
</table>
<br>
<table width="578" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
    <s:form method="post" action="/admin/catalogManage.do">
        <tr>
            <td height="33" colspan="4" align="center" valign="middle">
                <font color="#FF0000"></font> &nbsp; &nbsp;选择栏目:

                <s:select name="catalog.parentCatalog.id">
                    <s:options-collection collection="${actionBean.catalogs}" value="id" label="name"/>
                </s:select>
                &nbsp;&nbsp;类别名称:
                <s:text size="20" name="catalog.name"/>&nbsp;
                <s:submit name="addCatalog" value="添加"/>
            </td>

        </tr>
    </s:form>
</table>
<br>
<c:forEach items="${actionBean.catalogs}" var="catalog">
    <table class=tableCommonStyle cellpadding=3 cellspacing=1 border=0 align=center width="578">
        <tr>
            <td class=catStyle width=260>
                分类：${catalog.name}
            </td>
            <td class=catStyle>
                <a href="/admin/catalogManage.do?addCatalogForm&id=${catalog.id}">修改</a>
                | <a href="/admin/catalogManage.do?deleteCatalog&id=${catalog.id}">删除</a>
            </td>
        </tr>

        <c:if test="${not empty catalog.childs}">
            <c:forEach items="${catalog.childs}" var="child">
                <tr>
                    <td class=forumColorOne>
                        &nbsp;<img src='/imgs/admin/icon_t.gif' alt="${child.name}">分栏目：${child.name}
                    </td>
                    <td class=forumColorTwo>
                        <a href="/admin/catalogManage.do?addCatalogForm&id=${child.id}">修改</a>
                        | <a href="/admin/catalogManage.do?deleteCatalog&id=${child.id}">删除</a>
                    </td>
                </tr>
            </c:forEach>
        </c:if>
    </table>
</c:forEach>

